This application is based upon and claims benefit of priority of Japanese Patent Application No. 2000-49783 filed on Feb. 25, 2000, the content of which is incorporated herein by reference.
1. Field of the Invention
The present invention relates to a data conversion device which converts analog data to digital data, or digital data to analog data, and more particularly to such a conversion device that includes a mediator for determining a priority order of data conversion when plural requests for converting various sets of data are simultaneously made.
2. Description of Related Art
In an electronic control system for use in a recent automotive vehicle, various analog data to be converted into digital data are fed into an electronic control unit in the system. The analog data are sequentially converted into digital data according to requests for conversion. When plural requests for converting plural groups of analog data are simultaneously made, mediation for determining a priority order among the plural requests is made according to a predetermined rule.
An example of such mediation is described in JP-A-3-225054. In this example, when plural requests for converting plural groups of analog data into digital data are made, the conversion is performed group by group, allocating a short period of time to each group. More particularly, a flag signal xe2x80x9c1xe2x80x9d is given when a request for converting a certain group of data is made, and flag signal xe2x80x9c0xe2x80x9d is given when no request is made. Such flag signals for all requests are stored in a memory. The groups of analog data corresponding to the flag signal xe2x80x9c1xe2x80x9d are sequentially converted into digital data group by group according to a predetermined priority order. In this process, it is necessary to search each request as to whether its flag is xe2x80x9c1xe2x80x9d or xe2x80x9c0xe2x80x9d.
FIG. 7 shows the process of searching the flag signals in the above example. The flag signals stored in the memory are searched one by one according to a predetermined priority order of the requests. This searching loop is repeated until a flag xe2x80x9c1xe2x80x9d is found. Upon finding the flag xe2x80x9c1xe2x80x9d, the corresponding analog data group is selected as a data group to be converted. If no flag xe2x80x9c1xe2x80x9d is found throughout the search, the process moves out of the searching loop. Since the flag search is performed one by one until a flag xe2x80x9c1xe2x80x9d is found, it consumes time. That is, if a flag xe2x80x9c1xe2x80x9d is found at the ith loop and one loop requires Tr nanoseconds, (Trxc3x97i) nanoseconds are consumed for that search. If a flag xe2x80x9c1xe2x80x9d is found at the request having the lowest priority, the searching loop has to be repeated for all the requests.
Since the number of requests (the number of analog data groups to be converted into digital data) tends to increase in recent electronic control systems, it is a major problem that a long time is consumed for mediating the requests in the data conversion process. The same problem exists in a data conversion device for converting digital data to analog data.
The present invention has been made in view of the above-mentioned problem, and an object of the present invention is to provide an improved data conversion device in which the mediation among plural requests is quickly performed thereby to speed up the data conversion. Another object of the present invention is to provide a method for efficiently making mediation among the plural requests for data conversion.
The data conversion device according to the present invention is composed of a data converter and a mediator. Plural analog data groups to be converted into digital data are fed into the data converter, and an analog data group is converted group by group according to a request for conversion. If plural requests for conversion are simultaneously made, it is necessary to make mediation among the plural requests to select a data group to be first converted and to set a priority order. The mediator of the present invention performs such mediation. The data converter converts the analog data of the selected group into digital data according to the priority order determined by the mediator.
All the requests (Ri) for conversion are given respective priority orders. Further, when a certain request is actually made, a flag signal xe2x80x9c1xe2x80x9d is given to the request (Ri=1), and a flag signal xe2x80x9c0xe2x80x9d is given when no request is made (Ri=0). Each request (Ri) is weighted with a jth power of 2, and all the weighted requests are summed up. In other words, a function (F) corresponding to a combination of all the requests (Ri) is generated according to the following formula: F=xcexa3(2jxc3x97Ri), where i and j are integers different from each other. On the other hand, a table showing a relation between the function (F) and a request to be selected is preinstalled in the mediator. The mediator selects the data group to be converted, based on the function (F) by referring to the table.
Since the function (F) uniquely corresponds to each combination of all the requests, the request to be selected is easily and quickly determined based on the function (F). Various forms of the function (F) may be used for the mediation purpose, as long as the function (F) uniquely corresponds to a respective combination of requests (Ri). If the function (F) is formulated by summing up the requests (Ri) weighted with jth power of 2, as mentioned above, the mediator can be structured in a simple form, even in a hardware form. As the weighting factor of requests (Ri), 2(ixe2x88x921) may be used in place of 2j. The present invention may be similarly applied to a data converter for converting digital data to analog data.
According to the present invention, a request for data conversion having a higher priority is quickly selected from among plural requests through the mediation without searching all the requests one by one. Therefore, data conversion can be performed in a higher speed.
Other objects and features of the present invention will become more readily apparent from a better understanding of the preferred embodiment described below with reference to the following drawings.